﻿<!DOCTYPE html>
<html>

<head>
	<meta charset="utf-8">
	<!-- <meta name="viewport" content="width=640, user-scalable=no, target-densitydpi=device-dpi"> -->
	<meta name="viewport" content="width=640,user-scalable=no" />
	<meta name="format-detection" content="telephone=no">
	<meta name="keywords" content="" />
	<meta name="description" content="" />
	<title>detail</title>
	<link href="../css/style.css" rel="stylesheet">
	<script src="../js/jquery.js"></script>
	<script src="../js/plug-in.js"></script>

	<script src="../js/common.js"></script>

	<link href="../css/photoswipe.css" rel="stylesheet" />
	<link href="../css/default-skin.css" rel="stylesheet" />
	<script src="../js/photoswipe.js"></script>
	<script src="../js/photoswipe-ui-default.min.js"></script>
	<script src="../js/layer/layer.js"></script>
</head>

<body>
	<div id="slideNav">
		<div class="con">
			<ul>
				<li>
					<a href="###">登录</a>
				</li>
				<li>
					<a href="###">首页</a>
				</li>
				<li>
					<a href="###">找房</a>
				</li>
			</ul>
		</div>
	</div>
	
	<div id="main">
		<header class="ui-header ui-bg-f clearfix">
			<i class="icon ui-icon-return" onclick="history.back()"></i>
			<h1>房间详情</h1>
			<div class="user">

				<a href="javascript:;" id="toMenu" class="icon icon_user"></a>
			</div>
		</header>
		<section class="ui-container">
			<div id="detailFocusSlider">
				<div class=" slick_detail">
					<div>
						<img src="../picture/v800x600_chafd1nbzugawjsmaal0huwp14g702.jpg" onerror="this.src='../images/upload_big.jpg'" />
					</div>
					<div>
						<img src="../picture/v800x600_chafd1nbzuwaajzgaapokejbwxa842.jpg" onerror="this.src='../images/upload_big.jpg'" />
					</div>
					<div>
						<img src="../picture/v800x600_chafd1nbzuoazl8baaqcvrk8yai673.jpg" onerror="this.src='../images/upload_big.jpg'" />
					</div>
					<div>
						<img src="../picture/v800x600_chaffvnbzzuar4vxaauoosspis8445.jpg" onerror="this.src='../images/upload_big.jpg'" />
					</div>
					<p class="nums">
						<span id="detailCurNum">0</span>/
						<i id="detailTotalNum">0</i>
					</p>
				</div>

				<div class="hide">
					<a class="img-gallery" href="../picture/v800x600_chafd1nbzugawjsmaal0huwp14g702.jpg"></a>
					<a class="img-gallery" href="../picture/v800x600_chafd1nbzuwaajzgaapokejbwxa842.jpg"></a>
					<a class="img-gallery" href="../picture/v800x600_chafd1nbzuoazl8baaqcvrk8yai673.jpg"></a>
					<a class="img-gallery" href="../picture/v800x600_chaffvnbzzuar4vxaauoosspis8445.jpg"></a>
				</div>
			</div>
			<div class="blueimp-gallery" id="blueimp-gallery">
				<div class="slides"></div>
				<h3 class="title"></h3>

				<a class="close">×</a>
			</div>
			<script type="text/javascript">
				document.getElementById('detailFocusSlider').onclick = function (event) {
					event = event || window.event;
					var target = event.target || event.srcElement,
						link = target.src ? target.parentNode : target,
						options = {
							index: link,
							event: event
						},
						links = this.getElementsByClassName('img-gallery');
					blueimp.Gallery(links, options);
				};
			</script>
			<div class="ui-bg-f ui-bor-b detail_txt">

				<h2 class="">华茂苑4居室-西南卧
					<i class="i">合</i>
					<i class="i">月</i>
				</h2>
				<p class="ui-gray ellipsis">[福田区 梅林]4号线(龙华线)莲花北</p>
				<p class="price">
					<span class="en">¥2390</span>
					<span class="ui-gray">/月(季付)</span>
				</p>
				<a href="javascript:;" class="payType" id="payType">付款方式<span class="icon icon_right"></span></a>
				<p class="ui-gray icon icon_place ellipsis">距4号线(龙华线)莲花北步行314米</p>
				<div class="room_tags clearfix">
					<span class="balcony">独立阳台</span>
				</div>
			</div>


			<div class="ui-box">
				<h2 class="title title_left_none clearfix">
					<span class="txt">房间信息</span>
					<span class="photo-gallery">
						<a href="../images/huxing.jpg" data-size="640x454" data-med="../images/huxing.jpg"
						    data-med-size="1280x907" data-author="" class="">查看户型图
							<span class="icon icon_right"></span>
						</a>
					</span>
				</h2>


				<ul class="pl24 myHouseList">
					<li class="ui-bor-b clearfix styleTags">
						<p>
							<span class="icon icon_natie"></span>
							拿铁 </p>
						<p>
							<span class="icon icon_wifi"></span>
							WI-FI
						</p>
						<p>
							<span class="icon icon_baojie"></span>
							免费保洁
						</p>
						<p>
							<span class="icon icon_weixiu"></span>
							及时维修
						</p>
					</li>
					<li class="ui-bor-b houseInfo clearfix">
						<p>面积: 13.4㎡</p>
						<p>居室: 4居室</p>
						<p>朝向: 朝西南</p>

						<p>楼层: 2/7层</p>
					</li>

					<li class="ui-bor-b otherHouse clearfix">
						<img src="../picture/people.png" /> 02卧 男 双鱼座 </li>
					<li class="ui-bor-b otherHouse clearfix">
						<a href="###" class="clearfix">
							<img src="../picture/people.png" /> 03卧
							<span class="org">2370</span>元/ 月
							<span class="right">查看房间
								<span class="icon icon_right"></span>
							</span>
						</a>
					</li>
					<li class="ui-bor-b otherHouse clearfix">
						<img src="../picture/people.png" /> 05卧 男 天蝎座 </li>
				</ul>
			</div>



			<div class="ui-box">
				<h2 class="title title_left_none title_fw clearfix">
					<span class="txt">管家说</span>
				</h2>
				<div class="pl24">
					<div class="gjSay clearfix ui-bor-b">
						<div class="img">
							<img src="../picture/20305970.png"/>
						</div>
						<div class="txt">
							<p>我是自如管家，服务上百位自如客并与他们成为朋友，选择自如选择我，您就选择了舒心选择了安心！</p>
							<p class="org">Z.O.(自如管家)：吴浩艺</p>
						</div>
					</div>
					<ul class="zhoubian">
						<li class="ui-bor-b ">
							<span class="icon icon_market"></span>
							<p>小区位于梅华路，地处繁华的上梅林市场商圈，从北门往右20米就是万众城超市，过马路就有中国农业银行、招行银行，生活设施十分便利！往北200米就是福田二医院，还有临街餐饮店林立，衣食住行都很方便，小区位于上梅林市场，周围各种餐馆林立，让你尝遍各种美食。
							</p>
							<a href="javascript:;" class="showMore">点击展开全部</a>
						</li>
						<li>
							<span class="icon icon_subway"></span>
							<p>​出小区正门沿中康路向北步行就可以到达地铁上梅林地铁站，从小区东门过天桥即达地铁莲花北站，乘坐地铁十分方便，小区正门口是上梅林市场公交站，有328、324、60、102、207、216、218、222、374等公交，交通十分便利！</p>
							<a href="javascript:;" class="showMore">点击展开全部</a>
						</li>
					</ul>
				</div>


			</div>


			<div class="ui-box">
				<h2 class="title title_left_none clearfix">
					<span class="txt">推荐房源</span>
				</h2>
				<ul class="houseList">
					<li>
						<a href="###" class="clearfix">
							<div class="img">
								<img src="../picture/v800x600_chaffvjmsmmamdziaapzfdeveec173.jpg" onerror="this.src='../images/upload.jpg'" />
							</div>
							<div class="txt">
								<h2>华茂苑4居室-西北卧
									<span class="y i">阳</span>
								</h2>
								<p class="ui-gray stit">
									11.6㎡·朝
									<span class="h i">合</span>
									<span class="h i">月</span>
								</p>
								<p class="ui-gray icon icon_place ellipsis">距4号线(龙华线)莲花北步行314米</p>
								<p class="price">¥2430</p>
							</div>
						</a>
					</li>
					<li>
						<a href="###" class="clearfix">
							<div class="img">
								<img src="../picture/v800x600_chaffvommxyarqm3aarq626sqnm595.jpg" onerror="this.src='../images/upload.jpg'" />
							</div>
							<div class="txt">
								<h2>华茂苑4居室-东南卧
									<span class="y i">阳</span>
								</h2>
								<p class="ui-gray stit">
									11.4㎡·朝
									<span class="h i">合</span>
									<span class="h i">月</span>
								</p>
								<p class="ui-gray icon icon_place ellipsis">距4号线(龙华线)莲花北步行314米</p>
								<p class="price">¥2560</p>
							</div>
						</a>
					</li>
					<li>
						<a href="###" class="clearfix">
							<div class="img">
								<img src="../picture/v800x600_chafd1n69kuafbrmaaoz-w6hzeg960.jpg" onerror="this.src='../images/upload.jpg'" />
							</div>
							<div class="txt">
								<h2>华茂苑3居室-南卧
									<span class="y i">阳</span>
								</h2>
								<p class="ui-gray stit">
									15.7㎡·朝
									<span class="h i">合</span>
									<span class="h i">月</span>
								</p>
								<p class="ui-gray icon icon_place ellipsis">距4号线(龙华线)莲花北步行314米</p>
								<p class="price">¥2460</p>
							</div>
						</a>
					</li>
				</ul>
			</div>
		</section>

		<footer class="ui-footer ui-footer-btn">
			<div class="links">
				<a href="###">首页</a>
				<a href="###">找房</a>
			</div>
			<p class="cotyright">Copyright©2017</p>
		</footer>
		<br/>
		<br/>
		<br/>
	</div>

	<div id="fixedBottomBtn">
		<a href="javascript:;" class="shareBtn" id="shareBtn">分享</a>
		<a href="tel:400-100-1111" class="toTel">联系管家</a>
	</div>

	<div class="hide">
		<div id="shareBox">

			<div id="share">
				<div class="jiathis_style_24x24 clearfix">
					<table width="100%">
						<tbody>
							<tr>
								<td width="50%" height="50">
									<a class="jiathis_button_qzone" onclick="jiathis_sendto('qzone');">QQ空间</a>
								</td>
								<td width="50%">
									<a class="jiathis_button_tsina" onclick="jiathis_sendto('tsina');">新浪微博</a>
								</td>
							</tr>
							<tr>
								<td height="50">
									<a class="jiathis_button_douban" onclick="jiathis_sendto('douban');">豆瓣</a>
								</td>
								<td>
									<a class="jiathis_button_renren" onclick="jiathis_sendto('renren');">人人网</a>
								</td>
							</tr>
						</tbody>
					</table>
				</div>
				<script type="text/javascript" src="http://v3.jiathis.com/code/jia.js" charset="utf-8"></script>

				<style>
					.jiathis_style_24x24 .jiathis_txt {
						font-size: 28px;
					}
				</style>
			</div>
		</div>

		<div id="payTypeBox">
			<table border="0" cellspacing="0" cellpadding="0" class="payTypeBox">
				<tbody>
					<tr>
						<th>方式</th>
						<th>租金</th>
						<th>押金</th>
						<th>服务费</th>
					</tr>
					<tr>
						<td>月付</td>
						<td>￥3130/月</td>
						<td>￥3130/月</td>
						<td>￥3756/年</td>
					</tr>
					<tr>
						<td>季付</td>
						<td>￥2970/月</td>
						<td>￥2970/月 </td>
						<td>￥3564/年</td>
					</tr>
					<tr>
						<td>半年付</td>
						<td>￥2970/月</td>
						<td>￥2970/月</td>
						<td>￥3029/年</td>
					</tr>
					<tr>
						<td>年付</td>
						<td>￥2970/月</td>
						<td>￥2970/月</td>
						<td>￥2495/年</td>
					</tr>

				</tbody>
			</table>
		</div>

	</div>

	<div class="ui-dialog" id="showHxtBox">
		<div class="ui-dialog-cnt">
			<header class="ui-dialog-hd ui-border-b">
				<h3>户型图</h3>

			</header>
			<div class="ui-dialog-bd">

				<img src="../picture/v800x600_chaffvnbckwadvgoaakkclqpcw8867.jpg" width="100%" />


			</div>
			<div class="ui-dialog-ft">
				<a href="javascript:;" class="close">关闭</a>
			</div>
		</div>
	</div>

	<div id="gallery" class="pswp" tabindex="-1" role="dialog" aria-hidden="true">
		<div class="pswp__bg"></div>

		<div class="pswp__scroll-wrap">

			<div class="pswp__container">
				<div class="pswp__item"></div>
				<div class="pswp__item"></div>
				<div class="pswp__item"></div>
			</div>

			<div class="pswp__ui">
				<div class="pswp__top-bar">
					<button class="pswp__button pswp__button--close" title="Close (Esc)"></button>
					<div class="pswp__preloader">
						<div class="pswp__preloader__icn">
							<div class="pswp__preloader__cut">
								<div class="pswp__preloader__donut"></div>
							</div>
						</div>
					</div>
				</div>




				<div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap">
					<div class="pswp__share-tooltip">

					</div>
				</div>


				<div class="pswp__caption">
					<div class="pswp__caption__center">
					</div>
				</div>
			</div>

		</div>


	</div>

	<script type="text/javascript">
		(function () {

			var initPhotoSwipeFromDOM = function (gallerySelector) {
				var parseThumbnailElements = function (el) {
					var thumbElements = el.childNodes,
						numNodes = thumbElements.length,
						items = [],
						el,
						childElements,
						thumbnailEl,
						size,
						item;

					for (var i = 0; i < numNodes; i++) {
						el = thumbElements[i];

						// include only element nodes 
						if (el.nodeType !== 1) {
							continue;
						}

						childElements = el.children;

						size = el.getAttribute('data-size').split('x');

						// create slide object
						item = {
							src: el.getAttribute('href'),
							w: parseInt(size[0], 10),
							h: parseInt(size[1], 10),
							author: el.getAttribute('data-author')
						};

						item.el = el; // save link to element for getThumbBoundsFn

						if (childElements.length > 0) {
							item.msrc = childElements[0].getAttribute('src'); // thumbnail url
							if (childElements.length > 1) {
								item.title = childElements[1].innerHTML; // caption (contents of figure)
							}
						}


						var mediumSrc = el.getAttribute('data-med');
						if (mediumSrc) {
							size = el.getAttribute('data-med-size').split('x');
							// "medium-sized" image
							item.m = {
								src: mediumSrc,
								w: parseInt(size[0], 10),
								h: parseInt(size[1], 10)
							};
						}
						// original image
						item.o = {
							src: item.src,
							w: item.w,
							h: item.h
						};

						items.push(item);
					}

					return items;
				};

				// find nearest parent element
				var closest = function closest(el, fn) {
					return el && (fn(el) ? el : closest(el.parentNode, fn));
				};

				var onThumbnailsClick = function (e) {
					e = e || window.event;
					e.preventDefault ? e.preventDefault() : e.returnValue = false;

					var eTarget = e.target || e.srcElement;

					var clickedListItem = closest(eTarget, function (el) {
						return el.tagName === 'A';
					});

					if (!clickedListItem) {
						return;
					}

					var clickedGallery = clickedListItem.parentNode;

					var childNodes = clickedListItem.parentNode.childNodes,
						numChildNodes = childNodes.length,
						nodeIndex = 0,
						index;

					for (var i = 0; i < numChildNodes; i++) {
						if (childNodes[i].nodeType !== 1) {
							continue;
						}

						if (childNodes[i] === clickedListItem) {
							index = nodeIndex;
							break;
						}
						nodeIndex++;
					}

					if (index >= 0) {
						openPhotoSwipe(index, clickedGallery);
					}
					return false;
				};

				var photoswipeParseHash = function () {
					var hash = window.location.hash.substring(1),
						params = {};

					if (hash.length < 5) { // pid=1
						return params;
					}

					var vars = hash.split('&');
					for (var i = 0; i < vars.length; i++) {
						if (!vars[i]) {
							continue;
						}
						var pair = vars[i].split('=');
						if (pair.length < 2) {
							continue;
						}
						params[pair[0]] = pair[1];
					}

					if (params.gid) {
						params.gid = parseInt(params.gid, 10);
					}

					return params;
				};

				var openPhotoSwipe = function (index, galleryElement, disableAnimation, fromURL) {
					var pswpElement = document.querySelectorAll('.pswp')[0],
						gallery,
						options,
						items;

					items = parseThumbnailElements(galleryElement);

					// define options (if needed)
					options = {

						galleryUID: galleryElement.getAttribute('data-pswp-uid'),

						getThumbBoundsFn: function (index) {
							// See Options->getThumbBoundsFn section of docs for more info
							var thumbnail = items[index].el.children[0],
								pageYScroll = window.pageYOffset || document.documentElement.scrollTop,
								rect = thumbnail.getBoundingClientRect();

							return {
								x: rect.left,
								y: rect.top + pageYScroll,
								w: rect.width
							};
						},

						addCaptionHTMLFn: function (item, captionEl, isFake) {
							if (!item.title) {
								captionEl.children[0].innerText = '';
								return false;
							}
							captionEl.children[0].innerHTML = item.title + '<br/><small>Photo: ' + item.author + '</small>';
							return true;
						},

					};


					if (fromURL) {
						if (options.galleryPIDs) {
							// parse real index when custom PIDs are used 
							// http://photoswipe.com/documentation/faq.html#custom-pid-in-url
							for (var j = 0; j < items.length; j++) {
								if (items[j].pid == index) {
									options.index = j;
									break;
								}
							}
						} else {
							options.index = parseInt(index, 10) - 1;
						}
					} else {
						options.index = parseInt(index, 10);
					}

					// exit if index not found
					if (isNaN(options.index)) {
						return;
					}



					var radios = document.getElementsByName('gallery-style');
					for (var i = 0, length = radios.length; i < length; i++) {
						if (radios[i].checked) {
							if (radios[i].id == 'radio-all-controls') {

							} else if (radios[i].id == 'radio-minimal-black') {
								options.mainClass = 'pswp--minimal--dark';
								options.barsSize = {
									top: 0,
									bottom: 0
								};
								options.captionEl = false;
								options.fullscreenEl = false;
								options.shareEl = false;
								options.bgOpacity = 0.85;
								options.tapToClose = true;
								options.tapToToggleControls = false;
							}
							break;
						}
					}

					if (disableAnimation) {
						options.showAnimationDuration = 0;
					}

					// Pass data to PhotoSwipe and initialize it
					gallery = new PhotoSwipe(pswpElement, PhotoSwipeUI_Default, items, options);

					// see: http://photoswipe.com/documentation/responsive-images.html
					var realViewportWidth,
						useLargeImages = false,
						firstResize = true,
						imageSrcWillChange;

					gallery.listen('beforeResize', function () {

						var dpiRatio = window.devicePixelRatio ? window.devicePixelRatio : 1;
						dpiRatio = Math.min(dpiRatio, 2.5);
						realViewportWidth = gallery.viewportSize.x * dpiRatio;


						if (realViewportWidth >= 1200 || (!gallery.likelyTouchDevice && realViewportWidth > 800) || screen.width >
							1200) {
							if (!useLargeImages) {
								useLargeImages = true;
								imageSrcWillChange = true;
							}

						} else {
							if (useLargeImages) {
								useLargeImages = false;
								imageSrcWillChange = true;
							}
						}

						if (imageSrcWillChange && !firstResize) {
							gallery.invalidateCurrItems();
						}

						if (firstResize) {
							firstResize = false;
						}

						imageSrcWillChange = false;

					});

					gallery.listen('gettingData', function (index, item) {
						if (useLargeImages) {
							item.src = item.o.src;
							item.w = item.o.w;
							item.h = item.o.h;
						} else {
							item.src = item.m.src;
							item.w = item.m.w;
							item.h = item.m.h;
						}
					});

					gallery.init();
				};

				// select all gallery elements
				var galleryElements = document.querySelectorAll(gallerySelector);
				for (var i = 0, l = galleryElements.length; i < l; i++) {
					galleryElements[i].setAttribute('data-pswp-uid', i + 1);
					galleryElements[i].onclick = onThumbnailsClick;
				}

				// Parse URL and open gallery if it contains #&pid=3&gid=1
				var hashData = photoswipeParseHash();
				if (hashData.pid && hashData.gid) {
					openPhotoSwipe(hashData.pid, galleryElements[hashData.gid - 1], true, true);
				}
			};

			initPhotoSwipeFromDOM('.photo-gallery');

		})();
		$('#shareBtn').on('click', function () {

			layer.open({
				content: $('#shareBox').html(),
				style: 'width:90%',
				btn: ['关闭']
			});
		});

		$('#payType').on('click', function () {
			layer.open({
				content: $('#payTypeBox').html(),
				style: 'width:90%',
				btn: ['关闭']
			});

		});

	</script>
</body>

</html>